#include <stdio.h>
#include <pthread.h>
#include <unistd.h>
#include <semaphore.h>



int a=100;


void *myfunc1(void *arg)
{
	printf("1:%d\n",a);
	a=200;
}
void *myfunc2(void *arg)
{
	printf("2:%d\n",a);
	a=300;

}

int main(int argc, const char *argv[])
{

	pthread_t mypthread1;
	pthread_create(&mypthread1,NULL,&myfunc1,NULL);

	pthread_t mypthread2;
	pthread_create(&mypthread2,NULL,&myfunc2,NULL);


	sleep(1);
	printf("zhu:a=%d\n",a);		
	return 0;
}
